package com.example.adapterviewfood;

import java.util.ArrayList;
import java.util.zip.Inflater;

import com.example.demogui.R;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.EditText;
import android.widget.TextView;

public class Adapter extends BaseAdapter{
	ArrayList<Food> arrayFood;
	Context mContext;
	@Override
	public int getCount() {
		// TODO Auto-generated method stub
		return arrayFood.size();
	}

	@Override
	public Object getItem(int arg0) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public long getItemId(int arg0) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public View getView(int pos, View convertView, ViewGroup parrent) {
		// TODO Auto-generated method stub
		if(convertView!=null){
			LayoutInflater inflater = (LayoutInflater) mContext.getSystemService(mContext.LAYOUT_INFLATER_SERVICE);
			convertView = inflater.inflate(R.layout.item_listview, null);
		}
		TextView tvFoodName = (TextView) convertView.findViewById(R.id.tvFoodName);
		TextView tvPrice =(TextView)convertView.findViewById(R.id.tvPrice);
		EditText etQuantity = (EditText) convertView.findViewById(R.id.etQuantity);
		return convertView;
	}

}
